Skip to content

Autofill menu item's labels on page change#112

Open
iamstratos wants to merge 1 commit intotsiger:masterfrom
iamstratos:autofill-menu-labels
Open

Autofill menu item's labels on page change#112
iamstratos wants to merge 1 commit intotsiger:masterfrom
iamstratos:autofill-menu-labels

Conversation

@iamstratos
Copy link
Copy Markdown
Contributor

Issue

Creating a menu item will set the label to "New Item" or "New Child".
Then, you have to edit the label manually once you set a page.

Solution

Menu item's label will now change to the assign page's one if:

  • The label was "New Item" or "New Child"
  • The label was empty

If it was anything else, it won't change.

CleanShot 2026-05-10 at 00 39 21

Also, moved the default texts to menuUtils.js file as shared constants.

Potential issue:

If a user intentionally sets the label to exactly "New Item" or "New Child" and then picks an internal page, we'd still overwrite with page.label. That’s rare but possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant